import request from "@/utils/request";
//添加商品
// export function getCategoryList(params) {
//     return request({
//         url: "/channel/good/get-category-list",
//         method: "get",
//         params,
//     });
// }
export function goodRender(params) {
  return request({
    url: "channel/good/good-render",
    method: "get",
    params,
  });
}
// export function getUnit(params) {
//     return request({
//         url: "/channel/good/get-unit",
//         method: "get",
//         params,
//     });
// }
// export function getSpecs(params) {
//     return request({
//         url: "/channel/good/get-specs",
//         method: "get",
//         params,
//     });
// }
// export function getAttr(params) {
//     return request({
//         url: "/channel/good/get-attr",
//         method: "get",
//         params,
//     });
// }
// export function getMater(params) {
//     return request({
//         url: "/channel/good/get-mater",
//         method: "get",
//         params,
//     });
// }
export function attrShow(params) {
  return request({
    url: "channel/good/attr-show",
    method: "get",
    params,
  });
}
//商品保存
export function goodsSave(data) {
  return request({
    url: "channel/good/goods-save",
    method: "post",
    data,
  });
}
//商品编辑
export function goodDetail(params) {
  return request({
    url: "channel/good/good-detail",
    method: "get",
    params,
  });
}
// export function getGoodsSave(params) {
//     return request({
//         url: "/channel/good/goods-save",
//         method: "get",
//         params,
//     });
// }
// 商品列表
export function getGoodList(params) {
  return request({
    url: "channel/good/get-good-list",
    method: "get",
    params,
  });
}
export function goodDel(data) {
  return request({
    url: "channel/good/good-del",
    method: "post",
    data,
  });
}
//修改估清置满
export function setGoodNum(data) {
  return request({
    url: "channel/good/set-good-num",
    method: "post",
    data,
  });
}
//修改上下架、和推荐不推荐
export function goodDown(data) {
  return request({
    url: "channel/good/good-down",
    method: "post",
    data,
  });
}
//商品回收站恢复
export function goodsRecovery(data) {
  return request({
    url: "channel/good/goods-recovery",
    method: "post",
    data,
  });
}
//修改名字价格库存
export function goodUsave(data) {
  return request({
    url: "channel/good/good-usave",
    method: "post",
    data,
  });
}

// 商品分类
export function categoryList(params) {
  return request({
    url: "channel/category/get-category-list",
    method: "get",
    params,
  });
}
export function categoryDel(data) {
  return request({
    url: "channel/category/category-del",
    method: "post",
    data,
  });
}
export function categorySave(data) {
  return request({
    url: "channel/category/category-save",
    method: "post",
    data,
  });
}
export function changeCategorySwitch(data) {
  return request({
    url: "channel/category/change-switch",
    method: "post",
    data,
  });
}
// 规格
export function getSpecsList(params) {
  return request({
    url: "channel/specs/get-specs-list",
    method: "get",
    params,
  });
}

export function specsSave(data) {
  return request({
    url: "channel/specs/specs-save",
    method: "post",
    data,
  });
}

export function changeSpecs(data) {
  return request({
    url: "channel/specs/change-specs",
    method: "post",
    data,
  });
}

export function specsDel(data) {
  return request({
    url: "channel/specs/specs-del",
    method: "post",
    data,
  });
}

//批量修改价格库存
export function goodSpecsList(data) {
  return request({
    url: "channel/good/specs-list",
    method: "post",
    data,
  });
}
//批量保存价格库存是
export function goodsSpecsSave(data) {
  return request({
    url: "channel/good/specs-save",
    method: "post",
    data,
  });
}
// 属性
export function getAttrList(params) {
  return request({
    url: "channel/attribute/get-attr-list",
    method: "get",
    params,
  });
}

export function attrSave(data) {
  return request({
    url: "channel/attribute/attr-save",
    method: "post",
    data,
  });
}
export function changeAttr(data) {
  return request({
    url: "channel/attribute/change-attr",
    method: "post",
    data,
  });
}
export function attrDel(data) {
  return request({
    url: "channel/attribute/attr-del",
    method: "post",
    data,
  });
}
// 加料
export function getMateriaList(params) {
  return request({
    url: "channel/material/get-materia-list",
    method: "get",
    params,
  });
}

export function meteriaSave(data) {
  return request({
    url: "channel/material/meteria-save",
    method: "post",
    data,
  });
}
export function changeMeteria(data) {
  return request({
    url: "channel/material/change-materia",
    method: "post",
    data,
  });
}
export function materiaDel(data) {
  return request({
    url: "channel/material/materia-del",
    method: "post",
    data,
  });
}
// 单位
export function getUnitList(params) {
  return request({
    url: "channel/unit/get-unit-list",
    method: "get",
    params,
  });
}

export function unitSave(data) {
  return request({
    url: "channel/unit/unit-save",
    method: "post",
    data,
  });
}
export function changeDisplay(data) {
  return request({
    url: "channel/unit/change-display",
    method: "post",
    data,
  });
}
export function unitDel(data) {
  return request({
    url: "channel/unit/unit-del",
    method: "post",
    data,
  });
}
// 标签
export function getLabelList(params) {
  return request({
    url: "channel/good-label/get-label-list",
    method: "get",
    params,
  });
}

export function labelSave(data) {
  return request({
    url: "channel/good-label/label-save",
    method: "post",
    data,
  });
}
export function changeLabel(data) {
  return request({
    url: "channel/good-label/change-label",
    method: "post",
    data,
  });
}
export function labelDel(data) {
  return request({
    url: "channel/good-label/label-del",
    method: "post",
    data,
  });
}

//商品导入
export function goodExcelPull(data) {
  return request({
    url: "channel/good/good-excel-pull",
    method: "post",
    data,
  });
}

// 打印标签
export function getPrintList(params) {
  return request({
    url: "channel/print/get-print-list",
    method: "get",
    params,
  });
}
// 打印标签新增及修改
export function printSave(data) {
  return request({
    url: "channel/print/print-save",
    method: "post",
    data,
  });
}
// 启用禁用打印标签
export function changePrint(data) {
  return request({
    url: "channel/print/change-print",
    method: "post",
    data,
  });
}
// 打印标签删除
export function printDel(data) {
  return request({
    url: "channel/print/print-del",
    method: "post",
    data,
  });
}

// 同步商品到店内
export function synchroGoods(data) {
  return request({
    url: "channel/good/synchro-goods",
    method: "post",
    data,
  });
}
// 商品活动列表
export function goodsActiveList(params) {
  return request({
    url: "channel/activity/goods-activity-list",
    method: "get",
    params,
  });
}
// 获取商品活动详情
export function getGoodsActive(params) {
  return request({
    url: "channel/activity/save-goods-activity",
    method: "get",
    params,
  });
}
// 添加商品活动
export function setGoodsActive(data) {
  return request({
    url: "channel/activity/save-goods-activity",
    method: "post",
    data,
  });
}
// 修改商品活动
export function repGoodsActive(data) {
  return request({
    url: "channel/activity/modify-goods-activity",
    method: "post",
    data,
  });
}

// 商品特色分类
export function specialCategory(params) {
  return request({
    url: "channel/category/special-category",
    method: "get",
    params,
  });
}
// 修改特色分类
export function saveSpecial(data) {
  return request({
    url: "channel/category/save-special",
    method: "post",
    data,
  });
}
// 修改特色分类状态
export function modifySpecial(data) {
  return request({
    url: "channel/category/modify-special",
    method: "post",
    data,
  });
}
// 同步商品
export function changeGoods(data) {
  return request({
    url: "channel/good/change-goods",
    method: "post",
    data,
  });
}
// 同步外卖商品到店内
export function mergeGoods(data) {
  return request({
    url: "channel/good/merge-goods",
    method: "post",
    data,
  });
}
// 下架所有商品
export function allDown(data) {
  return request({
    url: "channel/good/all-down",
    method: "post",
    data,
  });
}
export function labelist(params) {
  return request({
    url: "channel/comment/label-list",
    method: "get",
    params,
  });
}
export function saveLabel(data) {
  return request({
    url: "channel/comment/save-label",
    method: "post",
    data,
  });
}
export function modifyLabel(data) {
  return request({
    url: "channel/comment/modify-label",
    method: "post",
    data,
  });
}
export function commentList(params) {
  return request({
    url: "channel/comment/comment-list",
    method: "get",
    params,
  });
}
export function modifyComment(data) {
  return request({
    url: "channel/comment/modify-comment",
    method: "post",
    data,
  });
}